package com.pj.common.utils

import android.view.View
import com.qmuiteam.qmui.widget.QMUITopBar
import com.qmuiteam.qmui.widget.QMUITopBarLayout

object TopBarUtils {

    /**
     * 初始化Topbar
     */
    fun initTopBar(topBar:QMUITopBarLayout,hasBack: Boolean =false,onBackClick: View.OnClickListener?=null) {
        if (hasBack)
            topBar.addLeftBackImageButton().setOnClickListener(onBackClick)
    }
}